package Strategy;

/**
 * Created with IntelliJ IDEA.
 * User: Bjarke
 * Date: 13-10-13
 * Time: 22:30
 * To change this template use File | Settings | File Templates.
 */
public class Animal {
    private String name;
    private int weight;
    private double height;
    private String favFood;
    private double speed;
    private String sound;



    // Composition, type of interface Flys
    public Flys flyingType;

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        if (weight > 0)
            this.weight = weight;
        else System.out.println("weight needs to be larger than 0");
    }

    public String getSound() {
        return sound;
    }

    public void setSound(String sound) {
        this.sound = sound;
    }

    public String getFavFood() {
        return favFood;
    }

    public void setFavFood(String favFood) {
        this.favFood = favFood;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }


    public String tryToFly(){
        return flyingType.fly();
    }

    public void setFlyingAbility(Flys flyingType){
        this.flyingType = flyingType;
    }
}
